<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter
 *
 */


/**
 * Lang
 *
 * Fetches a language variable and optionally outputs a form label
 *
 * @access	public
 * @param	string	the language line
 * @param	string	the id of the form element
 * @param	string	default
 * @return	string
 */
if ( ! function_exists('lang'))
{
	function lang($line, $id = '', $default = '')
	{
		$CI =& get_instance();
                $lineCI = $CI->lang->line($line);

		if ($id != '')
		{
                    $lineCI = '<label for="'.$id.'">'.$lineCI."</label>";
		}
		if ($lineCI == '' && $default)
		{
                    $lineCI = $default;
		} elseif ($lineCI === false) {
                    $lineCI = $line.'++';
		}

		return $lineCI;
	}
}

// ------------------------------------------------------------------------
/* End of file language_helper.php */
/* Location: ./system/helpers/language_helper.php */